package com.sz.app.oss.api.pay.transfer;

import com.sz.biz.app.web.BaseController;
import com.sz.biz.pay.transfer.service.NotifyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Function: 支付提现银行回调<br>
 *
 */

@RestController
@RequestMapping("/api/v1/pingan")
@Api(description = "平安签名回调地址", tags = "52、平安签名回调")
public class NotifyController extends BaseController {

    @Autowired
    private NotifyService notifyService;

    @ApiOperation(value = "获取平安签名回调地址GET")
    @RequestMapping(value = "/notifyByBank", method = RequestMethod.GET)
    public void notifyByGet(HttpServletRequest req, HttpServletResponse resp) {
        notifyByPost(req,resp);
    }

    @ApiOperation(value = "获取平安签名回调地址POST")
    @RequestMapping(value = "/notifyByBank", method = RequestMethod.POST)
    public void notifyByPost(HttpServletRequest req, HttpServletResponse resp) {
        notifyService.notifyByPost(req,resp);
    }

}
